package com.crm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.crm.dao.GroupDao;
import com.crm.pojo.Group;
@Service
@Transactional
public class GroupService {
	@Autowired
	private GroupDao groupDao;

	
	@Transactional(readOnly=true)
	public Group findById(String groupid) {
		return groupDao.findByUnique("id", groupid);
	}
	
	@Transactional(readOnly=true)
	public List<Group> list() {
		return groupDao.findAll();
	}
	
	
}
